package com.example.webservice1.service;

import com.example.webservice1.model.SysUser;
import org.springframework.stereotype.Service;

import javax.jws.WebService;
import java.util.Arrays;
import java.util.List;

/**
 * @author jie
 * @date 2021/4/25 -9:57
 */
@WebService(serviceName = "MyWebService",
        targetNamespace = "http://service.webservice1.example.com/",
        endpointInterface = "com.example.webservice1.service.MyWebService")
@Service
public class MyWebServiceImpl implements MyWebService {

    @Override
    public SysUser getName() {
        SysUser sysUser = new SysUser("1","Jie");

        return sysUser;
    }

    @Override
    public List<SysUser> getList() {
        List<SysUser> sysUserList = Arrays.asList(new SysUser("1","Jie1"),new SysUser("2","Jie2") );
        return sysUserList;
    }

    @Override
    public String getName2(String name) {
        return "我的名字是朱元杰"+name;
    }
}
